]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Only handle mode-switch shortcut when supported
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 7 Sep 2023 16:00:21 +0000 (18:00 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 7 Sep 2023 16:23:29 +0000 (18:23 +0200)
We currently handle the 'v' key to switch between recording- and
screenshot mode regardless of whether screen recordings are
supported.

This is clearly wrong, don't do that.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6990

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2944>

js/ui/screenshot.js

index d6365339680ebc6de814e2282e280909f7bacb60..c5c089c6bf08aeaa110bb9c3b7666f69ac03fe02 100644 (file)
@@ -2040,7 +2040,8 @@ export const ScreenshotUI = GObject.registerClass({
             return Clutter.EVENT_STOP;
         }
 
-        if (symbol === Clutter.KEY_v || symbol === Clutter.KEY_V) {
+        if (this._castButton.reactive &&
+            (symbol === Clutter.KEY_v || symbol === Clutter.KEY_V)) {
             this._castButton.checked = !this._castButton.checked;
             return Clutter.EVENT_STOP;
         }